import 'package:flutter/widgets.dart';

import 'package:thrio/thrio.dart';
import 'home/module.dart' as home;
import 'select/module.dart' as select;
import 'selectAddress/module.dart' as selectAddress;
import 'selectCity/module.dart' as selectCity;
import 'showAddress/module.dart' as showAddress;
class Module
    with ThrioModule, ModulePageBuilder, ModuleRouteTransitionsBuilder {
  @override
  String get key => 'home';

  @override
  void onModuleRegister(ModuleContext moduleContext) {
    registerModule(home.Module(), moduleContext);
    registerModule(select.Module(), moduleContext);
    registerModule(selectAddress.Module(), moduleContext);
    registerModule(selectCity.Module(), moduleContext);
    registerModule(showAddress.Module(), moduleContext);
  }

  @override
  void onRouteTransitionsBuilderSetting(ModuleContext moduleContext) {
    routeTransitionsBuilder = (
        context,
        animation,
        secondaryAnimation,
        child,
        ) =>
        SlideTransition(
          transformHitTests: false,
          position: Tween<Offset>(
            begin: const Offset(0, 1),
            end: Offset.zero,
          ).animate(animation),
          child: SlideTransition(
            position: Tween<Offset>(
              begin: Offset.zero,
              end: const Offset(0, -1),
            ).animate(secondaryAnimation),
            child: child,
          ),
        );
  }
}



